﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace 社畜
{
	public partial class PanelEx : Panel
	{
		public PanelEx() : base()
		{
			this.SetStyle( ControlStyles.UserPaint, true );
			this.BorderColor = Color.Transparent;
		}

		protected override void OnPaint( PaintEventArgs e )
		{
			Rectangle rect = e.ClipRectangle;

			base.OnPaint( e );
			rect.Height = e.ClipRectangle.Height - 1;
			rect.Width = e.ClipRectangle.Width - 1;
			e.Graphics.DrawRectangle( new Pen( new SolidBrush( BorderColor ), 1 ), rect );
		}

		public Color BorderColor{ get; set; }
	}
}
